home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 94 / CD-ROM 94.iso / util / weban / setup.msi / Cabs.w19.cab / cmdOverviewReport.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2002-02-28  |  3.7 KB  |  126 lines

  1. <?xml version="1.0"?> 
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3.  
  4. <xsl:variable name="Assessment">
  5.      <c score="1" text="Unable to Scan"/>
  6.     <c score="2" text="Severe Risk"/>
  7.     <c score="3" text="Potential Risk"/>
  8.     <c score="4" text="Security FYIs"/>
  9.     <c score="5" text="Strong Security"/>
  10. </xsl:variable>
  11.     
  12. <xsl:variable name="FileName" select="'file name here'"></xsl:variable>
  13.     
  14. <xsl:template match="SecScan">
  15.     
  16. <xsl:param name="assess" select="@Grade"/>
  17. <pre>                    
  18. Computer name:<xsl:value-of select="@Domain"/>\<xsl:value-of select="@Machine"/>
  19. IP address:<xsl:value-of select="@IP"/>
  20. Security report name:<xsl:value-of select="$FileName" />
  21. Scan date:<xsl:value-of select="@Date"/>
  22. <xsl:choose><xsl:when test="@HotfixDataVersion">Hotfix database version:<xsl:value-of select="@HotfixDataVersion"/></xsl:when></xsl:choose>    
  23. Security assessment:<xsl:value-of select="document('')/*/xsl:variable[@name='Assessment']/c[@score=$assess]/@text"/>
  24.  
  25. <xsl:choose>
  26. <xsl:when test="Check[@Type='1']">
  27.   Operating System Scan Results 
  28.     <xsl:choose>
  29.     <xsl:when test="Check[@Type='1'][@Cat='1']">
  30.     Vulnerabilities
  31.         <xsl:for-each select=".">
  32.             <xsl:apply-templates select="Check[@Type='1'][@Cat='1']">
  33.             </xsl:apply-templates>
  34.         </xsl:for-each>    
  35.     </xsl:when>
  36.     </xsl:choose>
  37.     <xsl:choose>
  38.     <xsl:when test="Check[@Type='1'][@Cat='2']">
  39.     Best Practices
  40.         <xsl:for-each select=".">
  41.             <xsl:apply-templates select="Check[@Type='1'][@Cat='2']">
  42.             </xsl:apply-templates>
  43.         </xsl:for-each>
  44.     </xsl:when>
  45.     </xsl:choose>
  46. </xsl:when>
  47. </xsl:choose>
  48. <xsl:choose>
  49. <xsl:when test="Check[@Type='3']">
  50.   Internet Information Services (IIS) Scan Results
  51.     <xsl:choose>
  52.     <xsl:when test="Check[@Type='3'][@Cat='1']">
  53.     Vulnerabilities
  54.         <xsl:for-each select=".">
  55.             <xsl:apply-templates select="Check[@Type='3'][@Cat='1']">    
  56.             </xsl:apply-templates>
  57.         </xsl:for-each>
  58.     </xsl:when>
  59.     </xsl:choose>
  60.     <xsl:choose>
  61.     <xsl:when test="Check[@Type='3'][@Cat='2']">
  62.     Best Practices
  63.         <xsl:for-each select=".">
  64.             <xsl:apply-templates select="Check[@Type='3'][@Cat='2']">
  65.             </xsl:apply-templates>
  66.         </xsl:for-each>
  67.     </xsl:when>
  68.     </xsl:choose>
  69. </xsl:when>
  70. </xsl:choose>
  71. <xsl:choose>
  72. <xsl:when test="Check[@Type='2']">
  73.   SQL Server Scan Results
  74.     <xsl:choose>
  75.     <xsl:when test="Check[@Type='2'][@Cat='1']">
  76.     Vulnerabilities
  77.         <xsl:for-each select=".">
  78.             <xsl:apply-templates select="Check[@Type='2'][@Cat='1']">        
  79.             </xsl:apply-templates>
  80.         </xsl:for-each>    
  81.     </xsl:when>
  82.     </xsl:choose>
  83.     <xsl:choose>
  84.     <xsl:when test="Check[@Type='2'][@Cat='2']">
  85.     Best Practices
  86.         <xsl:for-each select=".">
  87.             <xsl:apply-templates select="Check[@Type='2'][@Cat='2']">    
  88.             </xsl:apply-templates>
  89.         </xsl:for-each>    
  90.     </xsl:when>
  91.     </xsl:choose>
  92. </xsl:when>
  93. </xsl:choose>
  94. <xsl:choose>
  95. <xsl:when test="Check[@Type='4']">
  96.   Desktop Application Scan Results
  97.     <xsl:choose>
  98.     <xsl:when test="Check[@Type='4'][@Cat='1']">
  99.     Vulnerabilities
  100.         <xsl:for-each select=".">
  101.             <xsl:apply-templates select="Check[@Type='4'][@Cat='1']">
  102.             </xsl:apply-templates>
  103.         </xsl:for-each>
  104.     </xsl:when>
  105.     </xsl:choose>
  106.     <xsl:choose>
  107.     <xsl:when test="Check[@Type='4'][@Cat='2']">
  108.     Best Practices
  109.         <xsl:for-each select=".">
  110.             <xsl:apply-templates select="Check[@Type='4'][@Cat='2']">
  111.             </xsl:apply-templates>
  112.         </xsl:for-each>
  113.     </xsl:when>
  114.     </xsl:choose>
  115. </xsl:when>
  116. </xsl:choose>
  117. </pre>    
  118. </xsl:template>
  119.     
  120. <xsl:template match="Check">
  121. <xsl:param name="score" select="@Grade"/>
  122.           Issue:  <xsl:value-of select="@Name"/>
  123.        Score:  <xsl:value-of select="document('')/*/xsl:variable[@name='Assessment']/c[@score=$score]/@text"/>
  124.        Result: <xsl:value-of select="Advice"/>
  125. </xsl:template>
  126. </xsl:stylesheet>